package view;

import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

public class CusViewPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel lblAddress_ViewCus;
	private JLabel lblID_ViewCus;
	private JLabel lblPersionalID_ViewCus;
	private JLabel lblName_ViewCus;
	private JLabel lblPhone_ViewCus;
	private JTextField tfPersionalID_ViewCus;
	private JTextField tfID_ViewCus;
	private JTextField tfName_ViewCus;
	private JTextField tfPhone_ViewCus;
	private JTextField tfAddress_ViewCus;
	private JButton btnEdit_ViewCus;
	private JButton btnRemove_ViewCus;
	private JButton btnSearch_ViewCus;
	private JButton btnUpdate_ViewCus;
	@SuppressWarnings("rawtypes")
	private JComboBox cbbSearch_ViewCus;
	private JLabel lblSearchBy_ViewCus;
	private JPanel panelInfor_ViewCus;
	private JPanel panelSearch_ViewCus;
	private JPanel panelList_ViewCus;
	private JScrollPane jScrollPane1;
	private JTable table_ViewCus;
	private JTextField tfSearch_ViewCus;

	public CusViewPanel() {
		initComponents();
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	private void initComponents() {

		panelInfor_ViewCus = new JPanel();
		lblPhone_ViewCus = new JLabel();
		lblName_ViewCus = new JLabel();
		lblPersionalID_ViewCus = new JLabel();
		lblID_ViewCus = new JLabel();
		lblAddress_ViewCus = new JLabel();
		tfPersionalID_ViewCus = new JTextField();
		tfID_ViewCus = new JTextField();
		tfName_ViewCus = new JTextField();
		tfPhone_ViewCus = new JTextField();
		tfAddress_ViewCus = new JTextField();
		panelSearch_ViewCus = new JPanel();
		tfSearch_ViewCus = new JTextField();
		btnSearch_ViewCus = new JButton();
		lblSearchBy_ViewCus = new JLabel();
		cbbSearch_ViewCus = new JComboBox();
		btnEdit_ViewCus = new JButton();
		btnRemove_ViewCus = new JButton();
		panelList_ViewCus = new JPanel();
		jScrollPane1 = new JScrollPane();
		table_ViewCus = new JTable();
		btnUpdate_ViewCus = new JButton();

		setBackground(new java.awt.Color(255, 255, 255));
		setLayout(null);

		panelInfor_ViewCus.setBackground(new java.awt.Color(255, 255, 255));
		panelInfor_ViewCus.setBorder(BorderFactory.createTitledBorder(null, "Information",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelInfor_ViewCus.setLayout(null);

		lblPhone_ViewCus.setFont(new java.awt.Font("Calibri", 0, 16));
		lblPhone_ViewCus.setText("Phone:");
		panelInfor_ViewCus.add(lblPhone_ViewCus);
		lblPhone_ViewCus.setBounds(40, 90, 50, 20);

		lblName_ViewCus.setFont(new java.awt.Font("Calibri", 0, 16));
		lblName_ViewCus.setText("Name:");
		panelInfor_ViewCus.add(lblName_ViewCus);
		lblName_ViewCus.setBounds(40, 60, 50, 20);

		lblPersionalID_ViewCus.setFont(new java.awt.Font("Calibri", 0, 16));
		lblPersionalID_ViewCus.setText("Persional ID:");
		panelInfor_ViewCus.add(lblPersionalID_ViewCus);
		lblPersionalID_ViewCus.setBounds(350, 60, 90, 30);

		lblID_ViewCus.setFont(new java.awt.Font("Calibri", 0, 16));
		lblID_ViewCus.setText("ID:");
		panelInfor_ViewCus.add(lblID_ViewCus);
		lblID_ViewCus.setBounds(40, 30, 50, 20);

		lblAddress_ViewCus.setFont(new java.awt.Font("Calibri", 0, 16));
		lblAddress_ViewCus.setText("Address:");
		panelInfor_ViewCus.add(lblAddress_ViewCus);
		lblAddress_ViewCus.setBounds(350, 30, 60, 30);
		panelInfor_ViewCus.add(tfPersionalID_ViewCus);
		tfPersionalID_ViewCus.setBounds(440, 60, 170, 20);
		panelInfor_ViewCus.add(tfID_ViewCus);
		tfID_ViewCus.setBounds(120, 30, 170, 20);
		panelInfor_ViewCus.add(tfName_ViewCus);
		tfName_ViewCus.setBounds(120, 60, 170, 20);
		panelInfor_ViewCus.add(tfPhone_ViewCus);
		tfPhone_ViewCus.setBounds(120, 90, 170, 20);
		panelInfor_ViewCus.add(tfAddress_ViewCus);
		tfAddress_ViewCus.setBounds(440, 30, 170, 20);

		add(panelInfor_ViewCus);
		panelInfor_ViewCus.setBounds(10, 10, 680, 130);

		panelSearch_ViewCus.setBackground(new java.awt.Color(255, 255, 255));
		panelSearch_ViewCus.setBorder(BorderFactory.createTitledBorder(null, "Search",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelSearch_ViewCus.setLayout(null);
		panelSearch_ViewCus.add(tfSearch_ViewCus);
		tfSearch_ViewCus.setBounds(10, 30, 130, 20);

		btnSearch_ViewCus.setIcon(new ImageIcon("icon/search.png"));
		btnSearch_ViewCus.setText("Search");
		btnSearch_ViewCus.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton5ActionPerformed(evt);
			}
		});
		panelSearch_ViewCus.add(btnSearch_ViewCus);
		btnSearch_ViewCus.setBounds(240, 30, 90, 20);

		lblSearchBy_ViewCus.setText("By");
		panelSearch_ViewCus.add(lblSearchBy_ViewCus);
		lblSearchBy_ViewCus.setBounds(150, 30, 20, 20);

		cbbSearch_ViewCus.setModel(new DefaultComboBoxModel(new String[] { "Item 1",
				"Item 2", "Item 3", "Item 4" }));
		panelSearch_ViewCus.add(cbbSearch_ViewCus);
		cbbSearch_ViewCus.setBounds(170, 30, 56, 20);

		add(panelSearch_ViewCus);
		panelSearch_ViewCus.setBounds(10, 150, 340, 80);

		btnEdit_ViewCus.setBackground(new java.awt.Color(255, 255, 255));
		btnEdit_ViewCus.setIcon(new ImageIcon("icon/em_edit.png"));
		btnEdit_ViewCus.setText("Edit");
		add(btnEdit_ViewCus);
		btnEdit_ViewCus.setBounds(370, 180, 90, 30);

		btnRemove_ViewCus.setIcon(new ImageIcon("icon/em_delete.png"));
		btnRemove_ViewCus.setText("Remove");
		add(btnRemove_ViewCus);
		btnRemove_ViewCus.setBounds(570, 180, 100, 30);

		panelList_ViewCus.setBackground(new java.awt.Color(255, 255, 255));
		panelList_ViewCus.setBorder(BorderFactory.createTitledBorder(null,
				"List Customer", TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));

		table_ViewCus.setModel(new DefaultTableModel(new Object[][] {
				{ null, null, null, null, null },
				{ null, null, null, null, null },
				{ null, null, null, null, null },
				{ null, null, null, null, null },
				{ null, null, null, null, null } }, new String[] { "ID",
				"Name", "Persional ID", "Phone", "Address" }));
		jScrollPane1.setViewportView(table_ViewCus);

		GroupLayout jPanel3Layout = new GroupLayout(panelList_ViewCus);
		panelList_ViewCus.setLayout(jPanel3Layout);
		jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addComponent(jScrollPane1,
				GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE));
		jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGroup(
				jPanel3Layout
						.createSequentialGroup()
						.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE,
								152, GroupLayout.PREFERRED_SIZE)
						.addGap(0, 0, Short.MAX_VALUE)));

		add(panelList_ViewCus);
		panelList_ViewCus.setBounds(10, 240, 680, 170);

		btnUpdate_ViewCus.setBackground(new java.awt.Color(255, 255, 255));
		btnUpdate_ViewCus.setIcon(new ImageIcon("icon/save.png"));
		btnUpdate_ViewCus.setText("Update");
		btnUpdate_ViewCus.setEnabled(false);
		add(btnUpdate_ViewCus);
		btnUpdate_ViewCus.setBounds(470, 180, 90, 30);
	}

	private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
	}

}
